package com.example.feilin.entity;

import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;

/**
 * 登记车辆数据
 * Created by feilin on 2017/2/7.
 */
public class Queue extends Model<Queue> {
    public final static Queue me = new Queue();

    public Page<Queue> paginate(int pageNumber, int pageSize) {
        return paginate(pageNumber, pageSize, "select *", "from T_CHECKIN_FORM t where t.state=4");
    }
    
    
    public Page<Queue> paginate1(int pageNumber, int pageSize, String sortName, String sortOrder) {
    	StringBuilder sb = new StringBuilder();
    	sb.append("from T_CHECKIN_FORM t where t.state=4");
    	
    	if (sortName != null) {
    		sb.append("order by t."+sortName+" "+sortOrder);
    	}
    	return paginate(pageNumber, pageSize, "select *", sb.toString());
    }
}
